package com.example.test.bean;

import cn.hutool.core.img.ImgUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.resource.FileResource;

import javax.validation.constraints.Pattern;
import java.io.File;
import java.util.List;
import java.util.regex.Matcher;

public class Tree extends TreeParent {
    String id;
    String pid;

    List<Tree> list;

    public Tree(String id, String pid) {
        this.id = id;
        this.pid = pid;
    }

    public Tree() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public List<Tree> getList() {
        return list;
    }

    public void setList(List<Tree> list) {
        this.list = list;
    }

    public static void main(String[] args) {

        String property = System.getProperty("user.dir");

        String temPath = property + "/result.jpg";

        System.out.println(temPath);
        File file = FileUtil.file(temPath);
        ImgUtil.scale(FileUtil.file("C:\\Users\\Administrator\\Desktop\\1631864828.jpg"), file, 0.5f);
        file.deleteOnExit();

    }

}
